package com.wish.mqtt;

import java.io.File;

public class GuardThread extends Thread {
    //线程要执行的任务写在 run() 方法中
    @Override
    public void run(){
        while(true){
            //删除save.json文件
            File file = new File("C:\\Users\\Administrator\\Downloads\\save.json");
            boolean deleted = file.delete();
            System.out.println(deleted);
            //休眠
            try{
                Thread.sleep(1000);
            }catch (Exception e){
                e.printStackTrace();
            }
        }

    }
}
